/**
 * Copyright (c) iwindplus Technologies Co., Ltd.2024-2030, All rights reserved.
 */

package com.iwindplus.boot.redis.service;

import com.iwindplus.boot.redis.domain.annotation.RedisRateLimiter;
import org.aspectj.lang.JoinPoint;
import org.springframework.cache.interceptor.KeyGenerator;

/**
 * 限流Key解析器接口.
 *
 * @author zengdegui
 * @since 2020/6/13
 */
public interface RateLimiterKeyResolver {

    /**
     * 解析一个 Key.
     *
     * @param joinPoint    AOP切面
     * @param keyGenerator key生成器
     * @param rateLimiter  限流注解
     * @return Key
     */
    String resolver(JoinPoint joinPoint, KeyGenerator keyGenerator, RedisRateLimiter rateLimiter);
}
